a[3000];
f(int*a,int*b){return*a-*b;}
main(n,v,p,b,i)
{
	for(;~scanf("%d%d",&n,&p);puts(b?"Not jolly":"Jolly"))
	{
		for(i=--n;i;scanf("%d",&v),a[--i]=abs(p-v),p=v);
		for(qsort(a,n,4,f),b=i=0;i<n;b|=++i!=a[i-1]);
		for(i=0;i<n;printf("%d\n",a[i++]));
	}
}
